<?php
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
jimport( 'joomla.application.component.model' );
class ordersModelorders extends JModel
{   
    /**
     * Hellos data array
     *
     * @var array
     */
    var $_data;
    protected $storeid;

    /**
     * 导入淘宝订单
     *
     * @param unknown_type $storeid 淘宝店铺的id，为空的时候选择所有的店铺
     */
    function importOrders($storeid=''){
    	
    }
    function _getStores(){
    	
    }
    /**
     * Returns the query
     * @return string The query to be used to retrieve the rows from the database
     */
    function _buildQuery()
    {
        $query = ' SELECT * '
            . ' FROM #__menu '
        ;
        return $query;
    }
    /**
     * Retrieves the hello data
     * @return array Array of objects containing the data from the database
     */
    function getData()
    {
        // Lets load the data if it doesn't already exist
        if (empty( $this->_data ))
        {
            $query = $this->_buildQuery();
            $this->_data = $this->_getList( $query );
        }
        return $this->_data;
    }
    
    /**
    * Gets the greeting
    * @return string The greeting to be displayed to the user
    */
    function getGreeting()
    {
        $db =& JFactory::getDBO();
        $query = 'SELECT menutype FROM #__menu';
	    $db->setQuery( $query );
	    $greeting = $db->loadResult();
	    return $greeting;
    }

}